import React from 'react';
import { Provider } from 'react-redux';
import { Root } from '../container/root';
import { RootState } from '../interface/state';
import { configureStore } from '../store';


export const createRoot = (name: string, initialState?: RootState) => {
  return <Provider store={configureStore(initialState = {}, name)}>
    <Root metaName={name} metaId={name} initialState={initialState || {}} />
  </Provider>
}

